package com.mano.mall.web.shop.member.feign;

import com.alibaba.fastjson.JSONObject;
import com.mano.mall.api.dto.member.input.UserInputDTO;
import com.mano.mall.api.member.MemberRegisterService;
import com.mano.mall.common.base.BaseApiService;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

/**
 * @Author: zj
 * @Description:
 * @Date: Created in 15:44 2020/9/27
 * @Modified By:
 */

@FeignClient(value = "mano-mall-member",fallback = MemberServiceFeignCallBack.class)
public interface MemberRegisterServiceFeign extends MemberRegisterService {
}

@Component
class MemberRegisterServiceFeignCallBack extends BaseApiService implements MemberRegisterServiceFeign{
    @Override
    public BaseResponse<JSONObject> register(UserInputDTO userInputDTO, String registCode) {
        return setResultError("服务器忙，请稍后重试");
    }
}